//
//  ContactDetailViewController.m
//  17-Homework
//
//  Created by dllo on 16/8/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ContactDetailViewController.h"
#import "Contact.h"
@interface ContactDetailViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *contactImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *addressLabel;
@property (weak, nonatomic) IBOutlet UILabel *contactInfoLabel;

@end

@implementation ContactDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    NSData *imageData = [NSData dataWithContentsOfFile:_contact.imagePath];
    _contactImageView.image = [UIImage imageWithData:imageData];
    _nameLabel.text = _contact.name;
    _addressLabel.text = [NSString stringWithFormat:@"地址:%@", _contact.address];
    _contactInfoLabel.text = [NSString stringWithFormat:@"联系方式:%ld", _contact.telNumber];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
